{% for order in parameters.orders %}
<tr>  
	<td class="content">
		<div class="wrapper">
			<h1 class="ml">VPS: {{ order.getName() }}</h1>
		</div>
		<div class="wrapper">
			<table>
				<tr>
					<td width="50%">
						<h2 class="ml">Тариф {{ parameters.tarifs[order.getVpsTarif()]['name'] }}</h2>
						<table class="vps-custom">
							<tr>

								<td class="grey" width="40%">Процессор</td>
								<td>{{ order.getCpu() }} MГц
								<br>
								<a href="" class="action">добавить</a></td>
							</tr>
							<tr>
								<td class="grey">Дисковая система</td>
								<td>Основной диск — <script type="text/javascript">
                                                                                        g = ({{ order.getHdd() }} / 1024).toFixed(3);
                                                                                        document.write(g);
                                                                                    </script> Гб<br>
									/dev/xvda — 2 Гб <a href="" class="del">удалить</a><br>
									/dev/xvdb — 500 Мб <a href="" class="del">удалить</a><br>
							<a href="" class="action">добавить диск</a></td>
							</tr>
							<tr>
								<td class="grey">Оперативная память</td>
								<td>{{ order.getRam() }} Мб
								<br>
							<a href="" class="action">добавить память</a></td>
							</tr>
							<tr>
								<td class="grey">Стоимость дня, руб.</td>
								<td>{{ parameters.tarifs[order.getVpsTarif()]['cost'] }}</td>
							</tr>

						</table>
						<a href="" class="action">Остановить</a> <a href="" class="del">Переустановить систему</a> &nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;<a href="{{ url('orders_vps_extension', {'id': order.getId()} ) }}" class="action">Продлить</a><a href="{{ url('orders_vps_update', {'id': order.getId()} ) }}" class="action">Изменить тариф</a>
					</td>
					<td width="30%">
						<h2>Домены</h2>

                                                <script type="text/javascript">
                                                {% set i=1 %}
                                                {% for key, domain in parameters.domains %}
                                                    if ({{key}} == {{ order.getId() }})
                                                    {
                                                        {% for d in parameters.domains[key] %}
                                                            document.write('{{ i }}. <a href="">{{ d['name'] }}</a><br>');
                                                            {% set i=i+1 %}
                                                        {% endfor %}
                                                    }
                                                {% endfor %}
                                                </script>
                                                <br>
						<a href="{{ url('domains_add_to_order', {'id': order.getId()} ) }}" class="action">Добавить домен</a>
					</td>
					<td>
						<h2>Сетевые настройки</h2>

						<table class="vps-custom">
							<tr>
								<td class="grey">DNS</td>
								<td>
                                                                <script type="text/javascript">
                                                                {% for key, dns in parameters.dnss %}
                                                                    if ({{key}} == {{ order.getId() }})
                                                                    {
                                                                        {% for d in parameters.dnss[key] %}
                                                                            document.write('{{ d }}<br>');
                                                                        {% endfor %}
                                                                    }
                                                                {% endfor %}
                                                                </script>
                                                                </td>
							</tr>
							<tr>
								<td class="grey">IP</td>
                                                                <td>
                                                                <script type="text/javascript">
                                                                {% for key, ip in parameters.ips %}
                                                                    if ({{key}} == {{ order.getId() }})
                                                                    {
                                                                        {% for i in parameters.ips[key] %}
                                                                            document.write('{{ i }}<br>');
                                                                        {% endfor %}
                                                                    }
                                                                {% endfor %}
                                                                </script>
                                                                </td>
							</tr>
							<tr>
								<td class="grey">Gateway</td>
								<td>
                                                                <script type="text/javascript">
                                                                {% for key, gateway in parameters.gateways %}
                                                                    if ({{key}} == {{ order.getId() }})
                                                                    {
                                                                        {% for g in parameters.gateways[key] %}
                                                                            document.write('{{ g }}<br>');
                                                                        {% endfor %}
                                                                    }
                                                                {% endfor %}
                                                                </script>
                                                                </td>
							</tr>

						</table>
						<a href="{{ url('orders_vps_add_ip', {'id': order.getId()} ) }}" class="action">Добавить IP-адрес</a>
						</td>
					</tr>
				</table>
		</div>
		<div class="end"></div>
	</td>
</tr>
{% endfor %}
